package com.binance.mbxgateway.api;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import com.binance.master.configs.FeignConfig;
import com.binance.master.constant.Constant;
import com.binance.master.models.APIRequest;
import com.binance.master.models.APIResponse;
import com.binance.mbxgateway.vo.request.GetAggTradesRequest;

import io.swagger.annotations.Api;

@Api
@FeignClient(name = Constant.MBX_GATEWAY_SERVICE, configuration = FeignConfig.class)
public interface ITradeApi {

    @PostMapping("/public/aggTrades")
    public APIResponse<String> getAggTrades(@RequestBody APIRequest<GetAggTradesRequest> request) throws Exception;

    /**
     * 修复交易丢失记录
     * 
     * @param request
     * @return
     * @throws Exception
     */
//    @PostMapping(value = "/mgmt/backfillTrades")
//    public APIResponse<Void> backfillTrades(@RequestBody APIRequest<BackfillTradesRequest> request) throws Exception;

}
